/*
 * @(#)RelatedRule.java 1.0 3/30/06
 *
 * Made by LEFT thesis group
 * 
 * Transfer dictionary Module
 * 
 * The RelatedRule class holds the information that will be needed in the transfer phase to
 * get the list of rules that the certain word can fit into
 *
 */
 
 
 //I SHOULD GENERALIZE THIS
 //INSTEAD OF AN ID, I WILL CHANGE IT TO SEMANTIC CATEGORY AND PART OF SPEECH
 
package org.dlsu.mt.parser.TRANSFER;
import java.util.Vector;

public class RelatedRule{
	
	//id is a POS
	private String id;//The word id here is matched with the id of the word that is being translated
	
	//private String id;
	private Vector relatedRules;//The values here are rule numbers that are related to the word
	
	//contructor that assigns the parameter id as the entry's id
	public RelatedRule(String id){
		
		this.id = id;
		relatedRules = new Vector();
		
		//System.out.println(getId());					
	}
	
	
	//adds related rule to the vector relatedRules
	public void addRelatedRule(String ruleNum){
		
		relatedRules.add(ruleNum);
	}
	
	
	//returns the strings contained in the vector relatedRules
	public String[] getRelatedRules(){
		
		String arr[] = new String[relatedRules.size()];
		
		for(int i = 0; i < arr.length; i++){
			arr[i] = (String)relatedRules.get(i);
		}
		
		return arr;
	}
	
	//returns the transfer word id
	public String getId(){
		return id;
	}
	
	
	//for trial purposes only
	public void printRules(){
		System.out.println(relatedRules.toString());
	}
	
}